#ifndef PIE_CHART_H
#define PIE_CHART_H

#include <QWidget>
#include <QPainter>
#include <QMap>

namespace Ui {
class Pie_chart;
}

class Pie_chart : public QWidget
{
    Q_OBJECT
protected:
    void paintEvent(QPaintEvent *e);

public:
    explicit Pie_chart(QWidget *parent = nullptr);
    ~Pie_chart();
private:
    QString getPercentInt(const QString &percentStr);

private:
    Ui::Pie_chart *ui;
    QMap<QString, int> m_answerMap;
        QList<int> m_numList;
        QList<QString> m_answerStrList;
        int m_nPeopleCount;
        qreal m_pi = 3.1415;
};

#endif // PIE_CHART_H
